using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TerrainGeneration : MonoBehaviour
{
    
    int[,] terrainArray = new int[40,40]
    {{6,6,6,6,6,6,5,5,5,5,5,5,2,2,2,1,0,0,0,0,0,0,0,0,9,9,9,9,0,1,1,1,1,0,0,0,1,1,1,1},
    {6,6,6,6,6,5,5,5,5,5,0,0,2,2,2,1,0,0,0,1,5,5,0,0,0,9,9,0,0,1,1,1,1,0,0,0,0,1,1,1},
    {6,6,6,6,5,5,5,5,0,0,0,1,1,2,2,1,0,0,1,1,1,1,1,10,1,0,0,0,5,5,5,6,6,6,0,0,1,1,1,3},
    {6,6,6,6,5,5,5,5,0,8,0,1,1,2,2,0,0,0,0,1,1,0,0,1,1,0,0,0,1,1,5,6,6,6,0,0,0,0,1,3},
    {6,6,6,6,6,6,5,5,0,0,0,2,2,1,1,0,0,5,5,5,0,0,0,0,0,0,0,1,1,6,5,5,6,6,0,0,4,0,0,0},
    {5,5,5,6,6,6,5,0,0,0,2,2,2,1,0,5,5,5,5,5,6,0,6,0,0,5,0,1,1,6,5,5,5,5,5,5,5,4,4,0},
    {5,5,6,6,6,6,5,0,0,5,2,2,1,1,1,5,5,5,5,3,5,5,5,0,5,5,5,6,6,6,5,5,5,5,5,5,5,4,4,4},
    {5,5,5,6,6,6,5,0,0,0,2,2,1,1,1,1,1,3,3,3,3,0,0,5,5,5,5,6,6,6,0,0,5,5,5,5,5,4,4,4},
    {5,5,5,5,5,5,5,0,5,5,2,2,1,1,1,1,3,4,3,4,3,5,5,5,6,0,0,0,0,0,0,0,0,5,5,5,0,0,0,4},
    {5,5,3,5,5,5,5,10,0,5,0,2,1,5,1,1,1,3,4,4,3,5,5,5,5,5,0,0,1,1,0,5,5,5,0,0,0,0,0,0},
    {5,5,3,3,3,3,3,0,0,5,5,2,1,5,5,1,1,3,4,4,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,7,0,0},
    {0,3,3,3,3,3,0,0,0,5,0,0,0,1,5,5,1,1,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,2,2,1,1,0,0,0,1,2,2,1,0,5,5,5,5,6,7,2,5,1,1,1,5,0,7,0,0,0,2,2,2,3,1,3},
    {9,9,9,0,0,0,0,0,0,0,0,0,10,1,1,1,0,5,5,1,1,1,6,6,5,5,5,5,0,0,0,0,0,8,0,0,0,2,3,3},
    {9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,4,4,1,3,3,3,3,3,5,2,2,2,2,2,0,0,0,0,5,5,5,3,3},
    {9,9,9,9,9,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,10,3,3,3,3,3,3,3,2,2,2,2,0,5,5,5,3,3,3}};
// Start is called before the first frame update
void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
